package hhm.android.main.shoeSizeHistory

//class ExpandedableListAdapter(
//    groupL: ArrayList<ListHistoryModel>, childL: ArrayList<ArrayList<ListHistoryChildModel>>, var pageState: Int
//) : HBaseExpandableListAdapter<ListHistoryModel, ListHistoryChildModel, ExpandedableGroupViewHolder, ExpandedableChildViewHolder>(
//    groupL, childL, R.layout.item_shoe_size_history_list_group, R.layout.item_shoe_size_history_list_child
//) {
//    override fun getGroupViewHolder(v: View): ExpandedableGroupViewHolder {
//        return ExpandedableGroupViewHolder(v)
//    }
//
//    override fun getChildViewHolder(v: View): ExpandedableChildViewHolder {
//        return ExpandedableChildViewHolder(v)
//    }
//
//    override fun setGroupData(
//        groupPosition: Int, vh: ExpandedableGroupViewHolder, a: ListHistoryModel
//    ) {
//        vh.time.text = a.date
//    }
//
//    override fun setChildData(
//        groupPosition: Int, childPosition: Int, isLastChild: Boolean, vh: ExpandedableChildViewHolder, b: ListHistoryChildModel
//    ) {
//        if (pageState == 1) {
//            vh.select.visibility = View.GONE
//        } else if (pageState == 2) {
//            vh.select.visibility = View.VISIBLE
//        }
//        if (b.select) {
//            vh.select.setImageResource(R.mipmap.list_history_select)
//        } else {
//            vh.select.setImageResource(R.mipmap.list_history_unselect)
//        }
//        val sdf = SimpleDateFormat("HH:mm")
//        vh.time.text = sdf.format(b.recordTime)
//        vh.weight.text = "脚长（cm）:" + b.recordValue + "   " + SBApplication.userData.shoesType.typeName + ":" + b.size
//
//        if (b.recordType == 1) {
//            vh.iv.setImageResource(R.mipmap.foot_length_grey)
//        } else {
//            vh.iv.setImageResource(R.mipmap.input_by_hand_grey)
//        }
//
//        if (isLastChild) {
//            vh.line.visibility = View.GONE
//            if (groupPosition == group.size - 1) {
//                vh.line2.visibility = View.GONE
//            } else {
//                vh.line2.visibility = View.VISIBLE
//            }
//        } else {
//            vh.line.visibility = View.VISIBLE
//            vh.line2.visibility = View.GONE
//        }
//    }
//
//    override fun isChildSelectable(groupPosition: Int, childPosition: Int): Boolean {
//        return true
//    }
//
//    fun notifyData(group: ArrayList<ListHistoryModel>, child: ArrayList<ArrayList<ListHistoryChildModel>>) {
//        this.group = group
//        this.child = child
//        notifyDataSetChanged()
//    }
//}